/*
 * @Description: 设置管理API接口
 * @Author: QianLong
 * @Date: 2019-07-07 19:06:52
 * @LastEditors    : QianLong
 * @LastEditTime   : 2022-09-30 14:17:34
 */
import http from '@/utils/http/axios'

export function getProjectList(params) {
  return http.request({
    url: '/article/cate_list',
    method: 'GET',
    params
  })
}
export function getGroupList(params) {
  return http.request({
    url: '/article/group_list',
    method: 'GET',
    params
  })
}
export function getXmList(params) {
  return http.request({
    url: '/article/xm_list',
    method: 'GET',
    params
  })
}
export function getTransferCodeList(params) {
  return http.request({
    url: '/article/transfer_code_list',
    method: 'GET',
    params
  })
}
export function getProjectInfo(params) {
  return http.request({
    url: '/article/getProjectInfo',
    method: 'GET',
    params
  })
}
export function getCateWithLevel(params) {
  return http.request({
    url: '/article/all_cate_list',
    method: 'GET',
    params
  })
}
export function getDocContent(params) {
  return http.request(
    {
      url: '/article/getDocContent',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function searchDoc(params) {
  return http.request(
    {
      url: '/article/searchDoc',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function deleteDoc(params) {
  return http.request(
    {
      url: '/article/deleteDoc',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function getItemList(params) {
  return http.request({
    url: '/article/list',
    method: 'GET',
    params
  })
}
export function getDocCacheList(params) {
  return http.request({
    url: '/article/getDocCacheList',
    method: 'GET',
    params
  })
}
export function getDocHistoryList(params) {
  return http.request({
    url: '/article/getDocHistoryList',
    method: 'GET',
    params
  })
}

export function editData(params) {
  return http.request(
    {
      url: '/article/editItemInfo',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editViewsData(params) {
  return http.request(
    {
      url: '/article/editItemViews',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function saveDoc(params) {
  return http.request(
    {
      url: '/article/saveDoc',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function saveDocCache(params) {
  return http.request(
    {
      url: '/article/saveDocCache',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function moveArticle(params) {
  return http.request(
    {
      url: '/article/moveArticle',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function copyArticle(params) {
  return http.request(
    {
      url: '/article/copyArticle',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function batchUpdateSort(params) {
  return http.request(
    {
      url: '/article/batchUpdateSort',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function getCateInfo(params) {
  return http.request({
    url: '/article/editCateItem',
    method: 'GET',
    params
  })
}
export function getGroupInfo(params) {
  return http.request({
    url: '/article/editGroupItem',
    method: 'GET',
    params
  })
}
export function getDocWithLevel(params) {
  return http.request({
    url: '/article/getDocWithLevel',
    method: 'GET',
    params
  })
}
export function getOnlyGroupList(params) {
  return http.request({
    url: '/article/onlyGroupList',
    method: 'GET',
    params
  })
}
export function getCacheDocContent(params) {
  return http.request(
    {
      url: '/article/getCacheDocContent',
      method: 'GET',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function getHistoryDocContent(params) {
  return http.request(
    {
      url: '/article/getHistoryDocContent',
      method: 'GET',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}

export function editCateInfo(params) {
  return http.request(
    {
      url: '/article/editCateItem',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function requestChangeGroup(params) {
  return http.request(
    {
      url: '/article/changeGroup',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function requestTransferProject(params) {
  return http.request(
    {
      url: '/article/transferProject',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function editGroupInfo(params) {
  return http.request(
    {
      url: '/article/editGroupItem',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delArtItem(params) {
  return http.request(
    {
      url: '/article/delArt',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delDocCacheItem(params) {
  return http.request(
    {
      url: '/article/delDocCacheItem',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delCateItem(params) {
  return http.request(
    {
      url: '/article/delCate',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function delGroupItem(params) {
  return http.request(
    {
      url: '/article/delGroup',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}
export function addTransferCode(params) {
  return http.request(
    {
      url: '/article/add_transfer_code',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}

export function addData(params) {
  return http.request(
    {
      url: '/article/editItemInfo',
      method: 'POST',
      params
    },
    {
      isTransformRequestResult: false
    }
  )
}

export function getItemInfo(params) {
  return http.request({
    url: '/article/editItemInfo',
    method: 'GET',
    params
  })
}
